
(function (lib, config) {
    var loadFunc = function () {
        var textAry = config.words.split('|'), bgcolorAry = config.bgcolor.split('|'), textcolorAry = config.textcolor.split('|'), imglinkAry = config.imglink.split('|'), weblinkAry = config.weblink.split('|'), identifierAry = config.identifier.split('|');
        textAry[0] = textAry[0] || '';
        textAry[1] = textAry[1] || '';
        textAry[2] = textAry[2] || '';
        textAry[3] = textAry[3] || '';
        textAry[4] = textAry[4] || '';
        textAry[5] = textAry[5] || '';
        textAry[6] = textAry[6] || '蒋玉株医生';
        textAry[7] = textAry[7] || '副主任医师';
        textAry[8] = textAry[8] || '天伦医院院长';
        textAry[9] = textAry[9] || '30年妇科经验';
        imglinkAry[0] = imglinkAry[0] || 'http://3g.9941120.com/swt/images/fuke_jyz.jpg';
        imglinkAry[1] = imglinkAry[1] || 'http://3g.9941120.com/swt/images/fuke_zixun.gif';
        imglinkAry[2] = imglinkAry[2] || 'http://3g.9941120.com/swt/images/fuke_touxiang.jpg';
        imglinkAry[3] = imglinkAry[3] || 'http://3g.9941120.com/swt/images/fuke_fasong.png';
        bgcolorAry[0] = bgcolorAry[0] || '';
        identifierAry[0] = identifierAry[0] || '';
        (function () {
            var strVar = [];
            strVar.push("<style>");
            strVar.push("*{margin:0;padding:0;}");
            strVar.push(".fuke_foot input:-moz-placeholder,textarea:-moz-placeholder{color: #fff;}   ");
            strVar.push(".fuke_foot input:-ms-input-placeholder,textarea:-ms-input-placeholder {color: #fff;}   ");
            strVar.push(".fuke_foot input::-webkit-input-placeholder,textarea::-webkit-input-placeholder {color: #fff;}  ");/*top: 0;left:0;right:0*/
            strVar.push(".fuke_center{position: fixed;width: 100%;max-width: 640px;min-width: 320px;top: 0;left:0;right:0;margin: 0 auto;overflow: auto;height: 100%;z-index: 999999999999;display:none;}");
            strVar.push(".close_cen{position: absolute;width: 15%;height: 15%;left: 0;top:0;display:block;}");
            strVar.push(".fuke_top{background:url(http://3g.9941120.com/swt/images/fuke_logo.png) no-repeat 5% center #fff;background-size: 5%;line-height: 80px;text-align: center;font-size: 22px;color: #333;}");
            strVar.push(".fuke_top span{font-size: 30px;float: right;position: absolute;right: 5%;}");
            strVar.push(".fuke_ban{background: " + bgcolorAry[0] + ";padding: 0 5%;padding-bottom: 5%;box-sizing: border-box;overflow:hidden;}");
            strVar.push(".fuke_ban img{width: 40%;margin: 0 auto;display: block;padding-top: 5%;}");
            strVar.push(".fuke_ban a img{border-radius: 17px;width: 30%;margin-top:5%;padding:0;}");
            strVar.push(".fuke_ban ul{margin-top:4%;}");
            strVar.push(".fuke_ban ul li{line-height:59px;background: #bd9bec;color: #fff;font-size:23px;margin-right: 6px;width: 30%;float: left;}");
            strVar.push(".fuke_ban ul li:nth-child(3){margin-right: 0;}");
            strVar.push(".fuke_ban ul li:nth-child(2),.fuke_ban ul li:nth-child(3){width: 33.33%;}");
            strVar.push(".fuke_ban ul li span{width: 14%;height: 27px;display: block;background: url(http://3g.9941120.com/swt/images/fuke_slt.png) no-repeat 4% center;float: left;margin:9% 2% 0;background-size: 1000%;}");
            strVar.push(".fuke_ban ul li:nth-child(2) span{background-position: 21% center;}");
            strVar.push(".fuke_ban ul li:nth-child(3) span{background-position: 37% center;}");
            strVar.push(".fuke_begood{padding: 2.5%;background:#fff;height:87px;box-sizing: border-box;}");
            strVar.push(".fuke_begood h3{font-size: 21px;color: #000;float: left;height: 2rem;}");
            strVar.push(".fuke_begood span{font-size: 21px;width: 81%;float: left;}");

            strVar.push(".fuke_main{background: #f0eff4;padding-bottom: 25%;}");
            strVar.push(".fuke_main h3{font-size: 23px;padding-top: 3%;width: 60%;color: #656565;margin:0 auto;}");
            strVar.push(".fuke_main h3 span{background: url(http://3g.9941120.com/swt/images/fuke_slt.png) no-repeat 78% center;margin-top:1.5%;background-size: 1000%;display: block;width: 6%;height: 21px;float: left;}");
            strVar.push("#fuke_date{font-size: 22px;display: block;text-align: center;}");
            strVar.push(".fuke_reply{border:1px solid #333;text-align: center;display: block;margin:0 auto;font-size: 23px;line-height:42px;width: 70%;border-radius: 10px;background: url(http://3g.9941120.com/swt/images/fuke_pen.gif) no-repeat 90% center;background-size: 10%;margin-top: 4%;}");
            strVar.push(".fuke_line{padding: 0 5%;margin-top: 5%;position: relative;box-sizing: border-box;}");
            strVar.push(".fuke_line img{width:12%;float: left;margin-right:5%;}");
            strVar.push(".fuke_line div{font-size: 21px;border-radius: 10px;padding: 3%;box-sizing: border-box;background: #fff;display: block;line-height: 30px;margin-left: 16%;}");
            strVar.push(".fuke_line:before{content: \"\";background: url(http://3g.9941120.com/swt/images/fuke_sanj.png) no-repeat ;width: 25px;height: 25px;display: block;position: absolute;left: 16.9%;background-size: 100%;top: 13%;}");
            strVar.push(".fuke_foot{padding: 2%;box-sizing: border-box;background:#fff;position:fixed;bottom:0;left:0;right:0;width:100%;max-width:640px;min-width:320px;margin:0 auto;}");
            strVar.push(".fuke_foot input{background: #c8c4c3;color: #fff;border: none;line-height: 58px;font-size:22px;border-radius: 10px;width: 65%;margin-right: 5%;float: left;padding-left: 5%;}");
            strVar.push(".fuke_foot::-webkit-input-placeholder{color: #fff;}");
            strVar.push(".fuke_foot span{width: 25%;background: #ff6634;color: #fff;line-height: 58px;font-size: 22px;text-align: center;display: block;border-radius: 10px;float: left;}");
            strVar.push(".fuke_foot span img{width: 16%;}");
            strVar.push("#shake{position:relative;}");

            strVar.push("@media screen and (max-width:479px) and (min-width:319px){");
            strVar.push("    .fuke_top{font-size: 20px;line-height: 50px;}");
            strVar.push("    .fuke_top span{font-size: 20px;}");
            strVar.push("    .fuke_ban ul li{line-height: 35px;width: 29%;}");
            strVar.push("    .fuke_begood h3,.fuke_ban ul li{font-size: 14px;}");
            strVar.push("    .fuke_begood span{font-size: 14px;width: 78%;}");
            strVar.push("    .fuke_main h3{font-size: 14px;width: 59%;}");
            strVar.push("    .fuke_main h3 span{margin-top: -1%;}");
            strVar.push("    #fuke_date,.fuke_reply,.fuke_foot input,.fuke_foot span{font-size: 17px;}");
            strVar.push("    .fuke_reply{width: 72%;background-position: 96% center;line-height: 42px;}");
            strVar.push("    .fuke_line div{font-size: 18px;line-height: 26px;}");
            strVar.push("    .fuke_line:before{background-size:70%;width: 20px;height: 20px;}");
            strVar.push("    .fuke_foot input,.fuke_foot span{line-height: 3.5rem;}");
            strVar.push("    .fuke_ban ul li span{margin: 3% 2% 0;}");
            strVar.push("    .fuke_foot{padding:5%;}");
            strVar.push("}");
            strVar.push("@media screen and (max-width:639px) and (min-width:480px){");
            strVar.push("    .fuke_top{line-height: 60px;}");
            strVar.push("    .fuke_ban ul li,.fuke_begood h3,#fuke_date,.fuke_begood span,.fuke_main h3{font-size: 18px;}");
            strVar.push("    .fuke_main h3{width: 56%;}");
            strVar.push("    .fuke_main h3 span{margin-top: 1%;}");
            strVar.push("    .fuke_reply{font-size: 1.2rem;line-height: 2.5rem;width: 72%;}");
            strVar.push("    .fuke_line div{line-height: 1.5rem;font-size: 1.1rem;}");
            strVar.push("    .fuke_begood span{width: 75%;}");
            strVar.push("}");
            strVar.push("</style>");

            strVar.push("	<section class=\"fuke_center\" id=\"center_close\">");
            strVar.push("		<section class=\"fuke_top\"><a onclick=\"fk_close()\" class=\"close_cen\"></a>" + textAry[6] + "<span onclick=\"fk_close()\">X</span></section>");
            strVar.push("		<section class=\"fuke_ban\">");
            strVar.push("			<img src=\"" + imglinkAry[0] + "\" alt=\"\">");
            strVar.push("			<a href=\"javascript:void(0);\"  onClick=\"openZoosUrl(\'" + identifierAry[0] + "\');\"><img src=\"" + imglinkAry[1] + "\" alt=\"\"></a>");
            strVar.push("			<ul>");
            strVar.push("				<li><span></span>" + textAry[7] + "</li>");
            strVar.push("				<li><span></span>" + textAry[8] + "</li>");
            strVar.push("				<li><span></span>" + textAry[9] + "</li>");
            strVar.push("			</ul>");
            strVar.push("		</section>");
            strVar.push("		<section class=\"fuke_begood\">");
            strVar.push("			<h3>专业擅长：</h3>");
            strVar.push("			<span>" + textAry[0] + "</span>");
            strVar.push("		</section>");
            strVar.push("		<section class=\"fuke_main\">");
            strVar.push("			<h3><span></span>" + textAry[1] + "</h3>");
            strVar.push("			<span id=\"fuke_date\"></span>");
            strVar.push("			<span class=\"fuke_reply\">" + textAry[2] + "</span>");
            strVar.push("		<div id=\"shake\">");
            strVar.push("			<section class=\"fuke_line\" style=\"display: none;\" id=\"fuke_line\">");
            strVar.push("				<img src=\"" + imglinkAry[2] + "\" alt=\"\">");
            strVar.push("				<div>" + textAry[3] + "<font color=\"red\">“妇科”</font>" + textAry[4] + "</div>");
            strVar.push("			</section>");
            strVar.push("			<section class=\"fuke_line\" style=\"display: none;\" id=\"fuke_line1\">");
            strVar.push("				<img src=\"" + imglinkAry[2] + "\" alt=\"\">");
            strVar.push("				<div>" + textAry[5] + "</div>");
            strVar.push("			</section>");
            strVar.push("		</div>");
            strVar.push("		</section>");
            strVar.push("		<section class=\"fuke_foot\">");
            strVar.push("			<a href=\"javascript:void(0);\"  onClick=\"openZoosUrl(\'" + identifierAry[0] + "\');\">");
            strVar.push("				<input type=\"text\" placeholder=\"丨请在此输入您的问题....\" style=\"color: #fff;\">");
            strVar.push("				<span><img src=\"" + imglinkAry[3] + "\" alt=\"\">发送</span>");
            strVar.push("			</a>");
            strVar.push("		</section>");
            strVar.push("	</section>");

            var o = document.createElement('section');
            o.innerHTML = strVar.join('');
            while (o.firstElementChild) {
                document.body.appendChild(o.firstElementChild);
            };
            var date = document.getElementById("fuke_date");
            function tim() {
                var time = new Date();
                var mon = time.getMonth() + 1;
                var dat = time.getDate();
                var hou = time.getHours();
                var min = time.getMinutes();
                date.innerHTML = mon + "-" + dat + " " + hou + ":" + min;
            }
            tim();
            setInterval("tim()", 1000);
            var close = document.getElementById("center_close");
            setTimeout(function () {
                close.style.display = "block";
                var show = document.getElementById("fuke_line");
                var show1 = document.getElementById("fuke_line1");
                if (show.style.display == "none") {
                    setTimeout(function () {
                        show.style.display = "block"
                    }, 2000)
                }
                if (show1.style.display == "none") {
                    setTimeout(function () {
                        show1.style.display = "block"
                    }, 4000);
                }
                setTimeout(function () {
                    var swtdh_s = setInterval(swtdh_d, 0)
                    function swtdh_d() {
                        if (close.scrollTop + close.clientHeight == close.scrollHeight) { clearTimeout(swtdh_s); } else { close.scrollTop++; }
                        close.onmousewheel = function () { clearTimeout(swtdh_s); }
                        close.DOMMouseScroll = function () { clearTimeout(swtdh_s); }
                    }
                }, 4000)
            }, config.firsttime * 1000);
            function fk_close() {
                close.style.display = "none";
                setTimeout(function () {
                    close.style.display = "block";
                }, config.relapsetime * 1000);
            }



            function GetQueryString($name) {
                var $index = document.referrer.indexOf($name + "="), $e = '';
                if ($index > 1) {
                    $e = document.referrer.substring($index + $name.length + 1);
                    if (($index = $e.indexOf("&")) > 0) {
                        $e = $e.substring(0, $index);
                    }
                }
                return $e;
            }
            var $wd = GetQueryString("wd");
            if ($wd && $wd.length > 0) { } else { $wd = GetQueryString("word") }
            if ($wd && $wd.length > 0) {
                $wd = decodeURIComponent($wd);
                $line = '您好，我是蒋玉株，您是想问<font color="red">“【“' + $wd + '”】”</font>问题吗？';
            } else {
                $line = '您好，我是蒋玉株，您是想问<font color="red">“妇科”</font>问题吗？';
            }

            mfx = function (isWin) {
                var t = 7, z = 3, del = function () { clearInterval(mfx.ID); return mfx };
                del().ID = setInterval(function () {
                    var i = t / 180 * Math.PI, x = Math.sin(i) * z, y = Math.cos(i) * z, s = shake.style;
                    isWin ? window.moveBy(x, y) : (s.top = x + 'px', s.left = y + 'px');
                    if ((t += 90) > 1080) del();
                }, 30);
            }
            window.setInterval("mfx()", 6000);
        })();

    };
    lib.load(loadFunc);/*执行代码*/
})('{{lib}}', '{{config}}');